package com.supermarket.kafka.generator;

//作用：表示超市中的具体商品，包含核心属性

public class Product {
    private final int productId; //商品id
    private final String productName; //商品名称
    private final ProductCategory category; //商品类别
    private final int baseStock;  //基础库存量
    private final double popularityFactor;  //受欢迎系数，影响销量

    // 构造方法和getter

    public Product(int productId, String productName, ProductCategory category, int baseStock, double popularityFactor) {
        this.productId = productId;
        this.productName = productName;
        this.category = category;
        this.baseStock = baseStock;
        this.popularityFactor = popularityFactor;
    }

    // Getters
    public int getProductId() { return productId; }
    public String getProductName() { return productName; }
    public ProductCategory getCategory() { return category; }
    public int getBaseStock() { return baseStock; }
    public double getPopularityFactor() { return popularityFactor; }
}